+2007-12-24 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/gtkcombobox.c: When popping up a menu from a treeview cell,
+ use the time and button information from the event. (#504901,
+ Peter Bloomfield)
+
2007-12-23 Cody Russell <bratsche@gnome.org>
* gdk/win32/gdkevents-win32.c (show_window_recurse): Check that
guint reordered_id;
guint changed_id;
guint popup_idle_id;
+ guint activate_button;
+ guint32 activate_time;
guint scroll_timer;
guint resize_idle_id;
if (GTK_IS_MENU (combo_box->priv->popup_widget))
{
- gtk_combo_box_menu_popup (combo_box, 0, 0);
+ gtk_combo_box_menu_popup (combo_box,
+ combo_box->priv->activate_button,
+ combo_box->priv->activate_time);
return;
}
gtk_combo_box_popup (combo_box);
combo_box->priv->popup_idle_id = 0;
+ combo_box->priv->activate_button = 0;
+ combo_box->priv->activate_time = 0;
return FALSE;
}
*/
if (combo_box->priv->is_cell_renderer &&
combo_box->priv->cell_view && !combo_box->priv->tree_view)
- combo_box->priv->popup_idle_id = gdk_threads_add_idle (popup_idle, combo_box);
+ {
+ if (event && event->type == GDK_BUTTON_PRESS)
+ {
+ GdkEventButton *event_button = (GdkEventButton *)event;
+
+ combo_box->priv->activate_button = event_button->button;
+ combo_box->priv->activate_time = event_button->time;
+ }
+
+ combo_box->priv->popup_idle_id =
+ gdk_threads_add_idle (popup_idle, combo_box);
+ }
}